#pragma once

#include "lib.h"
#include "board.h"

class Board;
class AI
{
public:
	static void naive(CHESS_COLOR(&chessmen)[GRID_NUM][GRID_NUM], CHESS_COLOR side, vector<B_POINT> &records);

	static void moreStronger(CHESS_COLOR(&chessmen)[GRID_NUM][GRID_NUM], CHESS_COLOR side, vector<B_POINT> &records);

	static void miniMaxAI(CHESS_COLOR(&chessmen)[GRID_NUM][GRID_NUM], CHESS_COLOR side, vector<B_POINT> &records, int searchDepth);
private:
	static void howManyInLine(const CHESS_COLOR oldp[GRID_NUM][GRID_NUM], int qiju[GRID_NUM][GRID_NUM][8][2]);
	static void valueTheChessboardNavie(const CHESS_COLOR points[GRID_NUM][GRID_NUM], int qiju[GRID_NUM][GRID_NUM][8][2], int a1[GRID_NUM][GRID_NUM],int a2[GRID_NUM][GRID_NUM]);
	static bool firstStep(CHESS_COLOR(&chessmen)[GRID_NUM][GRID_NUM], CHESS_COLOR side, vector<B_POINT> &records);

	static int negaMax(int depth);
	static CHESS_COLOR makeMove(B_POINT pos,CHESS_COLOR side);
	static CHESS_COLOR unMakeMove(B_POINT pos, CHESS_COLOR side);

};
